-module (vis_test).
-export( [test/0] ).

test() ->
  io:format( "Vis test\n" ),
  V = vis:start( { -5.0, -2.0, +12.0, +8.0 } ),
  vis:addLine( V, 1.0, 1.0, 5.0, 10.0, [ {tag1, first}, {tag2, 0}, {color, red} ] ),
  vis:addLine( V, 5.0, 10.0, 30.0, 2.0, [ {tag1, first}, {tag2, 1}, {color, red} ] ),
  vis:addLine( V, 40.0, 0, 40.0, 20.0, [ {tag1, second}, {color, white} ] ),
  vis:addLine( V, 79.5, 20.0, 20.0, 30.0, [ {tag1, second}, {color, blue} ] ),
  vis:addText( V, 0.0, 0.0, "Origin", [ {halign, right}, {valign, bottom}, {color, yellow} ] ),
  vis:addCircle( V, 6.0, 4.0, 6.0, [ {color, red} ] ),
  vis:addRect( V, -1, 1, 3, 2, [] ),
  vis:addSquare( V, 3, -2, 1.5, [] ),
  vis:addDiamond( V, -4, -4, 1, [ {tag1, first}, {tag2, 1}, {color,green} ] ),
  timer:sleep( 2500 ),
  vis:remove( V, second ),
  timer:sleep( 2500 ),
  vis:remove( V, first, 1 ),
  timer:sleep( 5000 ),
  vis:clear( V ),
  timer:sleep( 1000 ),
  vis:stop( V ),
  init:stop().
